package com.example.oasystem.dao.notice;

import com.example.oasystem.entity.notice.AoaNoticeListOfSun;
import com.example.oasystem.entity.status.AoaStatusList;
import com.example.oasystem.entity.type.AoaTypeList;
import com.example.oasystem.entity.user.AoaUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface AoaUserNoticeDao {

   List<AoaNoticeListOfSun> selectNoticeAndUserAndTypeAndStatus(@Param("baseKey") String baseKey, @Param("aoauser") AoaUser aoauser);

   List<AoaTypeList> selectNoticeType();

   List<AoaStatusList> selectNoticeStatus();

   AoaNoticeListOfSun selectONENoticeAll(@Param("id") int id);

   AoaNoticeListOfSun selectUserNotice(@Param("id") long id);

   void delectNotice(@Param("id") long id);

   void delectNoticeRelation(@Param("id")long id);

   void updateTop(int isTop, long noticeId);

   void insertRelation(@Param("aoaUsers") List<AoaUser> aoaUsers,@Param("noticeId") long noticeId);

   void updateNotice(@Param("aoaNotice") AoaNoticeListOfSun aoaNotice);

   void addNotice(@Param("aoaNotice") AoaNoticeListOfSun aoaNotice);

}
